package com.yuexunit.account.service;

import com.yuexunit.inject.annotation.Implements;
import com.yuexunit.account.action.v2.model.VerifyCodeType;
import com.yuexunit.account.util.SMSService;

@Implements(SmsService.class)
public class SmsServiceImpl implements SmsService {
	@Override
	public void sendSms(String mobile, String content, VerifyCodeType type) {
		SMSService smsService = SMSService.getInstance();
		switch (type) {
			case REGISTER:
				smsService.sendRegister(mobile, content);
				break;
			case FOGET_PASSWORD:
				smsService.sendForgetPwd(mobile, content);
				break;
			case CHANGE_MOBILE:
				smsService.sendChangeMobile(mobile, content);
				break;
			default:
				smsService.sendSMS(mobile, content);
				break;
		}
	}
}
